﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VERKProjectHopur16.Models.UserViewModel>" %>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label" style="display:none">
                <%: Html.LabelFor(model => model.UserName) %>
            </div>
            <div class="editor-field" style="display:none">
                <%: Html.TextBoxFor(model => model.UserName)%>
                <%: Html.ValidationMessageFor(model => model.UserName)%>
            </div>

            <div class="editor-label" style="display:none">
                <%: Html.DisplayFor(model => model.UserName) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.RoleName)%>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.RoleName, Model.Roles)%>
                <%: Html.ValidationMessageFor(model => model.RoleName)%>
            </div>

            <div class="editor-label" style="display:none">
                <%: Html.LabelFor(model => model.OldRole) %>
            </div>
            <div class="editor-field" style="display:none">
                <%: Html.TextBoxFor(model => model.OldRole)%>
                <%: Html.ValidationMessageFor(model => model.OldRole)%>
            </div>
            
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back", "AllUser")%>
    </div>


